package com.chen.winnerframework.domain.entity.mybatis.log;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * 操作日志对象
 *
 * @author chengy
 * @date 2022-11-04
 */
@TableName("sys_operation_log")
public class OperationLog implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 操作日志主键
     */
    private Integer id;

    /**
     * 操作模块
     */
    @Excel(name = "操作模块", width = 20)
    private String module;

    /**
     * 业务类型
     */
    @Excel(name = "业务类型", width = 20, replace = {"新增_INSERT", "删除_DELETE", "更新_UPDATE", "导入_IMPORT",
            "导出_EXPORT", "强退_FORCE", "其他_OTHER"})
    private String businessType;

    /**
     * 方法名称
     */
    @Excel(name = "方法名称", width = 20)
    private String method;

    /**
     * 请求方式
     */
    @Excel(name = "请求方式", width = 20)
    private String reqMethod;

    /**
     * 操作人员
     */
    @Excel(name = "操作人员", width = 20)
    private String operator;

    /**
     * 请求URL
     */
    @Excel(name = "请求URL", width = 20)
    private String reqUrl;

    /**
     * 主机地址
     */
    @Excel(name = "主机地址", width = 20)
    private String ip;

    /**
     * 操作地点
     */
    @Excel(name = "操作地点", width = 20)
    private String location;

    /**
     * 请求参数
     */
    @Excel(name = "请求参数", width = 20)
    private String reqParam;

    /**
     * 响应参数
     */
    @Excel(name = "响应参数", width = 20)
    private String respParam;

    /**
     * 操作状态
     */
    @Excel(name = "操作状态", width = 20, replace = {"成功_0", "失败_1"})
    private Integer status;

    /**
     * 操作时间
     */
    @Excel(name = "操作时间", width = 20, format = DatePattern.NORM_DATETIME_PATTERN)
    private Date time;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getReqMethod() {
        return reqMethod;
    }

    public void setReqMethod(String reqMethod) {
        this.reqMethod = reqMethod;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getReqUrl() {
        return reqUrl;
    }

    public void setReqUrl(String reqUrl) {
        this.reqUrl = reqUrl;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getReqParam() {
        return reqParam;
    }

    public void setReqParam(String reqParam) {
        this.reqParam = reqParam;
    }

    public String getRespParam() {
        return respParam;
    }

    public void setRespParam(String respParam) {
        this.respParam = respParam;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

}
